<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/common.css"/>
	</head>
	<body>
		<div class="content">
			<img class="logo" src="img/logo.jpg"/>
			<h1>需求表单(静物拍摄)</h1>
			<div class="underline"></div>
				
				<div class="time">
					<div class="input_25 fl">
						<span>拍摄时间：&nbsp;&nbsp;&nbsp;</span>
						<span id="film_time" class="border"></span>
					</div>
					
					<div class="input_25 fl">
						<span>费用预算：&nbsp;&nbsp;&nbsp;</span>
						<span id="budget" class="border"></span>
					</div>
					
					<div class="input_25 fl">
						<span>完稿时间：&nbsp;&nbsp;&nbsp;</span>
						<span id="finish_time" class="border"></span>
					</div>
					<div class="clear"></div>
				</div>
				
				<div class="input_25" style="margin-bottom: 50px;">
					<span>供应商推荐:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
					<span id="supplier" class="border"></span>
				</div>
				
				<div class="title fl time">修图标准:</div>
				<div class="fl border" id="content_1"></div>
				<div class="clear"></div>
				
				
				<div class="title fl time">创意方案:</div>
				<div class="fl border" id="content_2"></div>
				<div class="clear"></div>
				
				<div class="title fl">已上传的方案:</div>
				<div id="download"></div>
		</div>
		
		<script src="js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			function GetArgsFromHref(sHref, sArgName){
			      var args    = sHref.split("?");
			      var retval = "";
			    
			      if(args[0] == sHref) /*参数为空*/
			      {
			           return retval; /*无需做任何处理*/
			      }  
			      var str = args[1];
			      args = str.split("&");
			      for(var i = 0; i < args.length; i ++)
			      {
			          str = args[i];
			          var arg = str.split("=");
			          if(arg.length <= 1) continue;
			          if(arg[0] == sArgName) retval = arg[1]; 
			      }
			      return retval;
			}
			
			var sn = GetArgsFromHref(window.location.href,'sn');
			
			$.ajax({
				type:"post",
				url:'./app/index.php?m=public&a=detail',
				data:{'sn':sn},
				success:function(ret){
					var _download = ret.detail.file.upload3;
					$("#film_time").html(ret.detail.film_time);
					$("#budget").html(ret.detail.budget);
					$("#finish_time").html(ret.detail.finish_time);
					$("#supplier").html(ret.detail.supplier);
					$("#content_1").html(ret.detail.content_1);
					$("#content_2").html(ret.detail.content_2);
					var html = '';
					for(var i in _download){
						var j = i;
						j = Number(j)
						j = j+1
						html = ""+j+".<img class='fl' src='img/ppt.png'/><a href='."+_download[i].download+"' class='fl' style='margin-right:10px'>点击下载附件</a>";		
						$("#download").append(html)
					}
				}
			});
		</script>
	</body>
</html>